package com.yn.front.controller;


import com.yn.common.page.BasePage;
import com.yn.common.request.sc.ArticleManageRequest;
import com.yn.common.request.sc.ArticleManageSearchRequest;
import com.yn.common.request.sc.PageParamRequest;
import com.yn.common.response.sc.BaseResult;
import com.yn.common.vo.ArticleManageVO;
import com.yn.service.service.IArticleTitleManageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 栏目管理 前端控制器
 * </p>
 *
 * @author xuquanjun
 * @since 2025-06-26
 */
@RestController
@RequestMapping("api/articleManage")
@Api(tags = "栏目管理——用户端")
public class ArticleTitleManageController {
    @Autowired
    private IArticleTitleManageService articleTitleManageService;

    /**
     * 分页显示栏目管理表
     * @param request ArticleSearchRequest 搜索条件
     * @param pageParamRequest 分页参数
     */
    @ApiOperation(value = "分页列表")
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    @ApiImplicitParam(name="keywords", value="搜索关键字")
    public BaseResult<BasePage<ArticleManageVO>> getList(ArticleManageSearchRequest request,
                                                         PageParamRequest pageParamRequest) {
        return BaseResult.success(BasePage.restPage(articleTitleManageService.getAdminList(request, pageParamRequest)));
    }

}
